/**
 * 小说
 * Created by Administrator on 2017/3/1.
 */
'use strict';

let mongoose = require('mongoose');

let schema=new mongoose.Schema({
    name:{
        type:String,
        default:''
    },
    author: {
        type:String,
        default:''
    },
    class:{
        type:String,
        default:'其他'
    },
    lastSectionName:{
        type:String,
        default:''
    },
    sections: {
        type: Array,
        default:[]
    },
    addTimeTick:{
        type:Number,
        default:0
    },
    updateTimeTick:{
        type:Number,
        default:0
    },
    status:{
        type:Number,
        default:0
    }
});
schema.index({name:1,updateTimeTick:-1}, {unique: false});
schema.index({author:1,updateTimeTick:-1}, {unique: false});
schema.index({class:1,updateTimeTick:-1}, {unique: false});

schema.statics={

};

module.exports= schema;